#!/usr/bin/python

#from pylab import *
import sys
import os
# appends project's (maloqp) parent directory to python search path
#sys.path.append(os.getcwd().rsplit(os.path.sep, 2)[0])
sys.path.append("/nfs/ural/e/vineet")

import maloqp.src.mcc as mcc

till = 9
folder = 'nosample'
N=200

x = [-1*i for i in xrange(till)]
ma = [0 for i in xrange(till)]
lo = [0 for i in xrange(till)]
qp = [0 for i in xrange(till)]

#no_of_samples = '200'
#sample = 'nosample'
#sample = "sf"
   
for i in xrange(till):
    file1 = "../nosample/s" + str(i)
    file2 = "../"+folder+"/ma" + str(i)
    file3 = "../"+folder+"/lo" + str(i)
    file4 = "../"+folder+"/qp" + str(i)
    
    #file2 = "../"+folder+"/ma" + str(i) + "_" + str(N)
    #file3 = "../"+folder+"/lo" + str(i) + "_" + str(N)
    #file4 = "../"+folder+"/qp" + str(i) + "_" + str(N)


    ma[i] = mcc.mcc(file1, file2, "--mcc")
    lo[i] = mcc.mcc(file1, file3, "--mcc")
    qp[i] = mcc.mcc(file1, file4, "--mcc")

    print x[i], ma[i], lo[i], qp[i]
    

#plot(x, qp, 'r-^', linewidth=2)
#plot(x, lo, 'b-s', linewidth=2)
#plot(x, ma, 'y-o', linewidth=2)

#axis([-10, 0, 0, 1])

#legend(('Quadratic Programming', 'Log-Odds', 'Match'),loc='lower right')
#xlabel('Energy')
#ylabel('MCC')
#title('Complete')
#axis([-10, 0, 1, 2500])
#grid(True)
#savefig("MCC_COMPLETE")
#show()
